package com.neuedu.oasystem.all;

import java.util.Scanner;

import com.neuedu.oasystem.view.AssetsView;
import com.neuedu.oasystem.view.CustomerView;
import com.neuedu.oasystem.view.EmpSystem;
import com.neuedu.oasystem.view.MeetingView;
import com.neuedu.oasystem.view.NoticeView;
import com.neuedu.oasystem.view.PlanSystem;
import com.neuedu.oasystem.view.PrivilegeSystem;

public class OaSystem {
	private Scanner scanner = null;

	public void init() {
		System.out.println("========================================");
		System.out.println("            欢迎使用OA办公系统                                 ");
		System.out.println("========================================");
		System.out.println("1.系统权限管理                                                         ");
		System.out.println("2.固定资产管理                                                         ");
		System.out.println("3.工作计划管理                                                         ");
		System.out.println("4.客户管理                                                                 ");
		System.out.println("5.人事管理                                                                 ");
		System.out.println("6.公告管理                                                                 ");
		System.out.println("7.会议管理                                                                 ");
		System.out.println("8.退出系统                                                                 ");
		System.out.println("========================================");
	}
	public void work() {
		scanner  = new Scanner(System.in);
		boolean running = true;
		while (running) {
			init();
			System.out.println("请选择：");
			String choose =scanner.nextLine();
			switch (choose) {
			//调用初始化固定资产
			case "1":
				//System.out.println("=========系统权限管理======");
				PrivilegeSystem privilegeSystem = new PrivilegeSystem();
				privilegeSystem.work();
				break;
			case "2":
				//System.out.println("=========固定资产管理  ======");
				AssetsView assetsView  = new AssetsView();
				assetsView.work();
				break;
			case "3":
				//System.out.println("=========工作计划管理======");
				PlanSystem planSystem = new PlanSystem();
				planSystem.work();
				break;
			case "4":
				//System.out.println("=========客户管理======");
				CustomerView customerView = new CustomerView();
				customerView.work();
				break;
			case "5":
				//System.out.println("=========人事管理=======");
				EmpSystem empSystem = new EmpSystem();
				empSystem.work();
				break;
			case "6":
				//System.out.println("=========公告管理=======");
				NoticeView noticeView = new NoticeView();
				noticeView.work();
				break;
			case "7":
				//System.out.println("=========会议管理  =======");
				MeetingView meetingView = new MeetingView();
				meetingView.show();
				break;
			case "8":
				System.out.println("已退出系统!");
				running = false;
				break;
			default:
				System.out.println("您的输入有误！");
				break;
			}
		}
		
	}

}
